<template>
  <ul>
    <li v-if="item.children"
        v-for="child in item.children"
        :key="child.path">
      <router-link :to="{name:child.name}">{{child.name}}</router-link>
      <navbar :item="child"></navbar>
    </li>
  </ul>
</template>

<script>
export default {
  name: 'navbar',
  props:{
    item: {
      type: Object,
      required: true
    }
  },
  created() {
    console.log(this.item)
  }
}
</script>

<style scoped>

</style>
